home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / NFSD / AUTH.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  46 lines

  1. /*
  2.  * include/linux/nfsd/auth.h
  3.  *
  4.  * nfsd-specific authentication stuff.
  5.  * uid/gid mapping not yet implemented.
  6.  *
  7.  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
  8.  */
  9.  
  10. #ifndef LINUX_NFSD_AUTH_H
  11. #define LINUX_NFSD_AUTH_H
  12.  
  13. #ifdef __KERNEL__
  14.  
  15. #define nfsd_luid(rq, uid)    ((u32)(uid))
  16. #define nfsd_lgid(rq, gid)    ((u32)(gid))
  17. #define nfsd_ruid(rq, uid)    ((u32)(uid))
  18. #define nfsd_rgid(rq, gid)    ((u32)(gid))
  19.  
  20. /*
  21.  * Set the current process's fsuid/fsgid etc to those of the NFS
  22.  * client user
  23.  */
  24. void        nfsd_setuser(struct svc_rqst *, struct svc_export *);
  25.  
  26. #if 0
  27. /*
  28.  * These must match the actual size of uid_t and gid_t
  29.  */
  30. #define UGID_BITS        (8 * sizeof(uid_t))
  31. #define UGID_SHIFT        8
  32. #define UGID_MASK        ((1 << UGID_SHIFT) - 1)
  33. #define UGID_NRENTRIES        ((1 << (UGID_BITS - UGID_SHIFT)) + 1)
  34. #define UGID_NONE        ((unsigned short)-1)
  35.  
  36. typedef struct svc_uidmap {
  37.     uid_t *            um_ruid[UGID_NRENTRIES];
  38.     uid_t *            um_luid[UGID_NRENTRIES];
  39.     gid_t *            um_rgid[UGID_NRENTRIES];
  40.     gid_t *            um_lgid[UGID_NRENTRIES];
  41. } svc_uidmap;
  42. #endif
  43.  
  44. #endif /* __KERNEL__ */
  45. #endif /* LINUX_NFSD_AUTH_H */
  46.